<template>
	<view>
		<image style="width:100vw" mode="widthFix" src="/static/image/header.jpg" ></image>
		<!-- 轮播图 -->
		<!-- <swiper class="swiper" indicator-dots="true" autoplay="true" interval="3000" :duration="1000">
			<swiper-item>
				<view class="swiper-item">
					<image src="/static/index/image/img1.jpeg" mode="widthFix"></image>
				</view> 
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image style="height:100vh" src="/static/index/image/img2.jpeg" mode="widthFix"></image>
				</view>
			</swiper-item>
			<swiper-item>
				<view class="swiper-item">
					<image style="width:100vw" src="/static/index/image/img3.jpeg" mode="widthFix"></image>
				</view>
			</swiper-item>
		</swiper> -->
		<view class="func" v-for="(item, index) in functions">
			<uni-card :title="item.title" :thumbnail="item.icon" extra="点击进入" @click="enterPages(item)">
				<text class="uni-body">{{item.descrip}}</text>
			</uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				functions: [{
						icon: "/static/index/image/record.svg",
						title: "健康打卡",
						descrip: "每日记录用户的健康打卡信息，监测用户地理位置、体温状态等情况的变化",
						url:'/pages/index/record/record'
					},
					{
						icon: "/static/index/image/test.svg",
						title: "核酸检测",
						descrip: "用户可登记核酸检测信息，查询核酸检测结果",
						url:'/pages/index/test/test'
					},
					{
						icon: "/static/index/image/out_in.svg",
						title: "出入管理",
						descrip: "用户提交入校申请和离校申请",
						url:'/pages/index/out-in/out-in'
					}
				],
			}
		},
		onLoad() {
			// 数据请求
			uni.request({
				url: '',
				method: 'GET',
				data: {},
				success: res => {},
				fail: () => {},
				complete: () => {}
			});
		},
		methods: {
			enterPages(item){
				uni.navigateTo({
					url: item.url,
					success: res => {},
					fail: () => {},
					complete: () => {}
				});
			}
		}
	}
</script>

<style>
	.func{
		margin-bottom: 50px;
	}
</style>
